/* 内部费用单
 */

import { postRequest, getRequest, getDownload } from '@/lib/axios'

export const expenseApi = {
  // 费用列表
  queryExpenseList: (param) => {
    return getRequest('/expense/list', param)
  },
  // 新增
  addExpense: (param) => {
    return postRequest('/expense/add', param)
  },
  // 修改
  editExpense: (param) => {
    return postRequest('/expense/edit', param)
  },
  // 删除
  delExpense: (param) => {
    return postRequest('/expense/del', param)
  },
  // 详情
  detailExpense: (param) => {
    return getRequest('/expense/detail', param)
  },
  // 导出
  exportExpense: (param) => {
    return getDownload('/expense/exportXlsx', param)
  },
  // 费用类别列表
  expenseCategoryList: (param) => {
    return getRequest('/expense-category/list', param)
  },
  // 新增
  addExpenseCategory: (param) => {
    return postRequest('/expense-category/add', param)
  },
  // 修改
  editExpenseCategory: (param) => {
    return postRequest('/expense-category/edit', param)
  },
  // 删除
  delExpenseCategory: (param) => {
    return postRequest('/expense-category/del', param)
  }
}
